import argparse as ap


def manage_cmd_args(argv=None):

    # #lizard forgives the function length
    parser = ap.ArgumentParser(description="PMS Analyzer",
                               formatter_class=ap.ArgumentDefaultsHelpFormatter)
    parser.add_argument("-ip",
                        type=str,
                        help="IP address to connect to Redis",
                        default="locahost")
    parser.add_argument("-port",
                        type=int,
                        help="Port to connect to Redis",default=6379)

    parser.add_argument("-taskId",
                        type=str,
                        help="Unique identifier for simulation matching")
    parser.add_argument("-taskType",
                        type=str,
                        help="Task type identifier, concatenated with taskId for Redis key")

    args = parser.parse_args(argv)
    return vars(args)

